//Author: Max Charnock
//Date: 16/02/2015
//Purpose: Class that takes a function pointer and excutes it when told. has two different textures or colours to indicate when
//selected.

#pragma once

#include "../nclgl/SceneNode.h"

class HUDManager;

using namespace std;

class Button
{
protected:

	bool textured;

	bool selected;

	//texture path for when not selected
	GLuint StandardTex;
	//texture path for when selected
	GLuint SelectedTex;

	SceneNode button;

	Mesh* cube;

	void (HUDManager::*p_function)(void);

public:

	Button(Vector3 position,float size,void (HUDManager::*function)(void));
	~Button();

	void Execute();

	//sets Textures
	void SetTextures(string standardtex,string selectedtex);

	void ToggleSelected();

	SceneNode* GetSceneNode() {return &button;}

	bool GetSelected() {return selected;}

};